<template>
  <div class="user">
      <h1>用户组件:{{$route.params.userId}}</h1>
      <h2>meta属性传参:{{$route.meta.name}}</h2>
  </div>
</template>

<script>
export default {
    compoent: {},
    beforeRouteEnter(to, from, next) {
        console.log('beforeRouteEnter: 导航即将进入组件');
        next()
    },
    beforeRouteUpdate(to, from, next) {
        console.log('beforeRouteUpdate: 导航发生了变化');
        next()
    },
    beforeRouteLeave(to, from, next) {
        console.log('beforeRouteLeave:导航离开了组件');
        next()
    },
    data() {
        return
    },
    computed: {},
    watch: {},
    methods: {},
    created() {},
    mounted() {},
    beforeCreate() {},
    beforeMount() {},
    beforeUpdate() {},
    updated() {},
    beforeDestroy() {},
    destroyed() {},
    activate() {},
}
</script>

<style>

</style>